<template>
  <div>
    <ze-input v-model="formData.foo" label="请假原因" />
    <ze-textarea v-model="formData.bar" label="备注" />
    <ze-submit @submit="onSubmit" />
  </div>
</template>

<script>
import ZeInput from '@/components/ze-oa-form/ze-input.vue'
import ZeTextarea from '@/components/ze-oa-form/ze-textarea.vue'
import ZeSubmit from '@/components/ze-oa-form/ze-submit.vue'
import { postProcessForm } from '@/apis/process'

export default {
  components: {
    ZeInput,
    ZeTextarea,
    ZeSubmit,
  },
  props: {},
  data() {
    return {
      formData: {
        foo: '',
        bar: '',
      },
    }
  },
  methods: {
    async onSubmit() {
      const res = await postProcessForm({
        processDefinitionId: 'test_123:1:3be526d4-7d46-11ee-b3ff-0ed5a5e7df61',
        variables: this.formData,
      })
      console.log(res)
    },
  },
}
</script>

<style lang="scss" scoped>

</style>
